package com.unicom.auth.controller;

import java.util.List;

import com.jfinal.aop.Clear;
import com.unicom.auth.controller.base.BaseController;
import com.unicom.auth.kit.SessionKits;
import com.unicom.auth.model.Resource;
import com.unicom.auth.model.User;

public class MainController extends BaseController {

	@Clear
	@Override
	public void index() {
		User user=SessionKits.getUser(this);
		List<Resource> resources=Resource.dao.findMenus(user);
		System.out.println("menu:"+resources.size());
		for (Resource resource : resources) {
			System.out.println(resource);
		}
		setAttr("menus", resources);
		myRender("/main.html");
	}

}
